package com.house365.core.action;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class TabChangeReceiver extends BroadcastReceiver {

	private final TabChanger tabChanger;

	public TabChangeReceiver(TabChanger tabChanger) {
		this.tabChanger = tabChanger;
	}

	public void onReceive(Context context, Intent intent) {
		String str = intent.getAction();
		if (ActionTag.INTENT_ACTION_CHANGE_TAB.equals(str)) {
			int i = intent.getIntExtra("tab_index", 0);
			tabChanger.changeTab(i);
		}
	}
}
